home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / dalla rivista / netconnect3 / mftp-ii / install_mftp < prev    next >
Text File  |  1999-10-20  |  25KB  |  625 lines

  1. ;******************************************************************************
  2. ;              ______ ______ ______
  3. ;             / ____//_  __// __  /
  4. ;    _   _   / /_     / /  / /_/ /
  5. ;   / \_/ \ / __/    / /  / ____/
  6. ;  / /__/ // /      / /  / /
  7. ; /_/  /_//_/      /_/  /_/
  8. ;                         
  9. ; $VER: mFTP_Installer 0.63 (September-26-1999) 
  10. ; mFTP ©1999 Jamie van den Berge 
  11. ;      ©1995-98 Michael Neuweiler
  12. ; Installer by Robert C. Reiswig ©1999
  13. ;
  14. ; If you wish to use any part of this installer you must ask. May not be 
  15. ; integrated/placed into any other package. You may NOT change this in an way!
  16. ; Changes, suggestions or problems: mFTP@vgr.com or rob@vapor.com
  17. ;******************************************************************************
  18.  
  19. ;*** System Stuff ***
  20. (set cpu (database "cpu"))  (set vblank (database "vblank"))
  21. (set graphmem (database "graphics-mem")) (set totmem (database "total-mem"))
  22. (set osver (/ (getversion "LIBS:version.library") 65536))
  23. (if (= vblank "60") ((set blank "NTSC")) ((set blank "PAL")))
  24. (set fastmem (- totmem graphmem))
  25.  
  26. (if (= osver 37) (set workbench "2.0")) (if (= osver 38) (set workbench "2.1"))
  27. (if (= osver 39) (set workbench "3.0")) (if (= osver 40) (set workbench "3.1"))
  28. (if (= osver 41) (set workbench "3.2"))
  29.  
  30. (set cpu (database "cpu"))
  31. (if (> (exists ("sys:libs/68060.library")) 0) (set #cpu 5) )
  32. (if (= cpu 68000) (set #cpu 0)) (if (= cpu 68010) (set #cpu 1))
  33. (if (= cpu 68020) (set #cpu 2)) (if (= cpu 68030) (set #cpu 3))
  34. (if (= cpu 68040) (set #cpu 4)) (if (= cpu 68060) (set #cpu 5)) 
  35.  
  36. (set vernum1 (getversion "mFTP")) (set ver1 (/ vernum1 65536))
  37. (set rev1 (- vernum1 (* ver1 65536) ) ) (set mFTPver (cat ver1 "." rev1))
  38. (if (= ver1 0) (set mFTPver "1.0"))
  39.  
  40. (if (> (exists ("env:Language")) 0) (set lanfound (getenv "Language")) )
  41. (set lan 0)
  42.  
  43. (if (= "english"    lanfound) (set lan 0))  (if (= "deutsch"    lanfound) (set lan 1))
  44. (set #English    "English")  (set #Deutsch    "Deutsch")
  45.  
  46. (set mfound 0) (set newicon1 1) 
  47. (set keeper 1) (set firsttime 0)
  48.  
  49.  
  50. ;********************************************************************
  51. ; English Strings
  52. ;********************************************************************
  53. ;;(set #about (cat "\n\nWelcome to mFTP-II " mFTPver "\n\n\nBy\n\nJamie van den Berge ©1999\n\nMichael Neuweiler ©1995-98") )
  54. (set #about (cat "\n" 
  55.                  "Welcome to\n\n"
  56.                  "mFTP-II " mFTPver "\n\n\n"
  57.                  "Copyright ©1999 Active Technologies\n\n"
  58.                  "Programming by:\n\n"
  59.                  "Jamie van den Berge & Michael Neuweiler\n\n"
  60.             ) 
  61. )
  62. (set #installup " Install or Update mFTP-II")
  63. (set #clearcache " Clear Cache Directory")
  64. (set #task "\nWhat would you like to do?\n")
  65. (set #wheremFTP "Where do you wish to install mFTP-II. The directory 'mFTP' will be created if it is not there. If a copy of mFTP is found it will be backed up.")
  66. (set muiver "No Version Installed")
  67. (set #newermui "\nmFTP-II needs version 3.8 or higher of MUI installed to work correctly.\n\nNow would be a good time to Upgrade!\n\nYou can find mui38usr.lha on Aminet in util/libs\n\nIt looks like you have: \n\n")
  68. (set #nomuiarc "\nThe installer could not find the MUI dir in the archive. Because of this the MUI Classes used by mFTP were not installed.\n\n If you are Updating mFTP then this is not a problem. If it is your first time installing mFTP you will need to get an archive with these files.")
  69. (set #updatingmuic "\nUpdating the MUI Classes if needed.\n\n(#?.mcc & #?.mcp)")
  70. (set #nompc "\nThe .MCC files for mFTP-II can not be installed to 'mui:libs/mui'")
  71. (set #need-os "\n\nmFTP-II needs version 3.0 or higher of the Amiga OS installed to work correctly.\n\n It looks like you have: \n\n")
  72. (set #000used "\n\nThe 68000 version will be installed.") 
  73. (set #nompc "\nThe .MPC files for mFTP-II can not be installed to 'mui:libs/mui'")
  74. (set #noreg1 "\nThe installer could not find 'S:mFTP.Key' or '")
  75. (set #noreg2 "' on your system. It also does not seem to be in the archive you are installing mFTP-II from. You may need to get the archive again.\n\nThe installer will now run the Registration Utility, 'Registrationutility'.")   
  76. (set #filethere1 "\n\nThe installer has found mFTP-II version ")
  77. (set #filethere2 " at ")
  78. (set #filethere3 "\n\nThe file will be renamed to ")
  79. (set #filethere4 " and it will then be moved to ")
  80. (set #backuptoXXX "Back-UP to file named 'mFTP-II.")
  81. (set #copyover "Copy Over Old Version")
  82. (set #oktodelete1 "\nIs it ok to delete the older mFTP binary so that the mFTP Directory can be made?\n")
  83. (set #oktodelete2 "\nIs it ok to delete the older _renamed_ mFTP binary so that the mFTP Directory can be made?\n")
  84. (set #mFTPfound "\nThe Installer has found a copy of mFTP-II already installed. What do you want to do?\n")
  85. (set #no030found "\n\nThe 68030+FPU Version of mFTP-II, V030, was not found in this archive this is why the 68000 version was installed.")
  86. (set #newicon "\nDo you wish to copy over The mFTP Icon from the archive? If you have any ToolTypes already set you should select no.\n")
  87. (set #nonewicon  "No  - ToolTypes already set.")
  88. (set #yesnewicon "Yes - Copy over Icon.")
  89. (set #yesnewicon "Yes - Copy over Icon.")
  90. (set #whatcat "\nSelect the mFTP-II Language catalog you wish to install.\n")
  91. (set #wherecat "\nWhere do you wish to install the mFTP-II Language Catalog? Default is ")
  92. (set #catnofind "Can not find this catalog in this mFTP-II archive. You may need to get a newer archive.")
  93. (set #whattools "\nWhat Tools would you like to install? They will be placed in: ")
  94. (set #updatingmuic "\nUpdating the MUI Classes if needed.\n\n(#?.mcc & #?.mcp)")
  95. (set #nomuiarc "\nThe installer could not find the MUI dir in the archive. Because of this the MUI Classes used by mFTP were not installed.\n\n If you are Updating mFTP then this is not a problem. If it is your first time installing mFTP you will need to get an archive with these files.")
  96. (set #whatdocs "\nWhat mFTP-II documentation would you like to install?\n")
  97. (set #wheredocs "Where would you like the mFTP-II documentation you selected to be installed?")
  98. (set #byebye (cat "\nmFTP Install Complete!\n\n" ))
  99.  
  100. (set #askcpu "\nWhat version of mFTP-II would you like to install?\n")
  101. (set #noregdir "\nThe Registration directory was not found. This means that the archive has been altered or is bad. Please get another copy of the mFTP Archive.\n\nOR\n\nThe Keyfile is missing. Please contact your REG site.")
  102. (set #updatesetpatch "\nThe installer looked for 'c:setpatch' and did not find it or you have a version lower then 40.16. mFTP needs version 40.16 to work correctly. You wany want to upgrade soon. (NOTE: if you keep 'setpatch' in a different place than 'c:' and its 40.16 or higher then this message is void.)")
  103. (set #updateinstaller "\nJust to let you know ESCOM AG has released a new version of the installer program.\n\n\nVersion 43.3 can be found on Aminet in:\n\n/util/misc/Installer-43_3.lha\n\n\nYou might want to upgrade soon, if you can.")
  104.  
  105. (set #whatcat "\nSelect the mFTP-II Language catalog you wish to install.\n")
  106. (set #wherecat "\nWhere do you wish to install the mFTP-II Language Catalog? Default is ")
  107. (set #catnofind "Can not find this catalog in this mFTP-II archive. You may need to get the complete archive from the support site.")
  108.  
  109. (set #wantbuttons "\nThe installer has found that the directory 'Images' exist. Do you still wish to install the default Images? If you have created your own you should select 'No'.\n")
  110. (set #yesbutton "Yes - Copy default images over")
  111. (set #nobuttons "No - Use currently installed images")
  112.  
  113. (set #wantflags "\nThe installer has found that the directory 'Images/Flags' exist. Do you still wish to install the default Flag images? If you have created your own you should select 'No'.\n")
  114. (set #yesflags "Yes - Copy default Flag images over")
  115. (set #noflags "No - Use currently installed Flag images")
  116.  
  117. (set #updatedlibs "\nInstall/Update the Vapor Libraries?\n* = Must be installed to work correctly\n(Click 'Help' for more info on the libs.)\n")
  118. (set #lib1 " Update library")
  119. (set #lib2 " Toolkit library (*)")
  120. (set #lib3 " Registration library")
  121. (set #libC " CManager lib [Bookmarks] (*)")
  122. (set #libhelp1 "vapor_update.library:\nIf installed every Vapor app will automagically check for updates by querying the Vapor server via Internet. You will be informed and offered automatic downloading if there is an update.")
  123. (set #libhelp2 "\n\nvapor_toolkit.library:\nContains support functions which are used by most Vapor applications and thus can be shared to reduce individual application code size. ie: Async I/O library, crytographically strong random number generator, math support.")
  124. (set #libhelp3 "\n\nvapor_registration.library:\nContains the core code for the registration utility\n")
  125. (set #libhelpC "\n\nCManager.library:\nThe Contact Manager is a unique product for the Amiga. It's best described as a diary / address book which allows you to store all your contacts' user information, favourite web & ftp sites and IRC server/channels. mFTP uses CManager.library'")
  126. (set #wherelibs "Where do you wish to place the Vapor lib(s), 'Libs:' is default.")
  127. (set #flushing "\n\nRunning:\n\n'avail flush >NIL:'\n\n to try to flush old Vapor libraries from memory.")
  128.  
  129. (set #insregstuff " Install Register information")
  130. (set #insregstuffno " Don't Install Register information")
  131. (set #installerreg "\nThe installer did not find an mFTP-II key in the usual places. Do you wish to install the Register information?\n") 
  132.  
  133. (set #wheremp "\nWhere do you wish to install the MimePrefs program?\n")
  134.  
  135. ;********************************************************************
  136. ; Check Last ENV
  137. ;********************************************************************
  138. (if (> (exists "env:Vapor/mFTP_LASTUSEDDIR") 0) 
  139.  (
  140.   (set lastdir (getenv "Vapor/mFTP_LASTUSEDDIR"))
  141.   (set lastdirlen (strlen lastdir))
  142.   (set tricklen (+ 1 (strlen (fileonly lastdir))))
  143.   (set lastdir (substr lastdir 0 (- lastdirlen tricklen) ) )
  144.   (if (= 0 (exists lastdir (noreq))) (set lastdir (cat lastdir ":"))) 
  145.  )
  146.  (set lastdir 0)
  147. )
  148.  
  149.  
  150. ;********************************************************************
  151. ; German Strings
  152. ;********************************************************************
  153. (if (= lan 1) (set Humm TRUE) )
  154.  
  155. ;********************************************************************
  156. ; Check on Setpatch 
  157. ;********************************************************************
  158. (set vernum1 (getversion "c:setpatch")) (set ver1 (/ vernum1 65536)) 
  159. (set rev1 (- vernum1 (* ver1 65536) ) ) (set setpatchver (cat ver1 "." rev1))
  160. (set current_setpatch "40.16")
  161. (if (< setpatchVer current_setpatch) (message #updatesetpatch) )
  162.  
  163. ;********************************************************************
  164. ; Check on New installer 
  165. ;********************************************************************
  166. (set InstallerVer 0)
  167. (set vernum1 @installer-version) (set ver1 (/ vernum1 65536)) 
  168. (set rev1 (- vernum1 (* ver1 65536) ) ) (set InstallerVer (cat ver1 "." rev1))
  169. (set current_installer "43.3")
  170. (if (< InstallerVer current_installer) (message #updateinstaller) )
  171.  
  172.  
  173. ;********************************************************************
  174. ; Hello
  175. ;********************************************************************
  176. (message #about)
  177. (welcome) 
  178.  
  179. ;********************************************************************
  180. ; Checks for MUI & OS versions
  181. ;********************************************************************
  182. (set ver 0)
  183. (if (<> (getassign "mui") "")
  184. (
  185.   (if (exists "mui:mui") 
  186.    (
  187.     (set vernum (getversion "mui:mui") )
  188.     (set ver (/ vernum 65536)) (set rev (- vernum (* ver 65536) ) )
  189.    )
  190.   
  191.    (
  192.     (if (exists "sys:prefs/mui") 
  193.      (
  194.        (set vernum (getversion "sys:prefs/mui") )
  195.        (set ver (/ vernum 65536)) (set rev (- vernum (* ver 65536) ) )
  196.      )
  197.     )
  198.    )
  199.   )
  200. )
  201. )
  202.  
  203. (if (= ver 7) (set muiver "2.0") )   (if (= ver 8) (set muiver "2.1") )
  204. (if (= ver 9) (set muiver "2.2") )   (if (= ver 10) (set muiver "2.3") )
  205. (if (= ver 11) (set muiver "3.0") )  (if (= ver 12) (set muiver "3.1") )
  206. (if (= ver 13) (set muiver "3.2") )  (if (= ver 14) (set muiver "3.3") )
  207. (if (= ver 15) (set muiver "3.4") )  (if (= ver 16) (set muiver "3.5") )
  208. (if (= ver 17) (set muiver "3.6") )  (if (= ver 18) (set muiver "3.7") )
  209. (if (= ver 19) (set muiver "3.8") )  (if (= ver 20) (set muiver "3.9") )
  210.  
  211. (if (< ver 19)   ( (message (cat #newermui muiver))   (set cpuPick 0) ))
  212. (if (< osver 37) ( (message (cat #need-os workbench)) (set cpuPick 0) ))
  213.  
  214. ;********************************************************************
  215. ; Ask where to put mFTP & Make dir if needed
  216. ;********************************************************************
  217. (set Package (getassign "AmiTCP") )
  218. (if (= Package "") (set Package (getassign "Inet")) )
  219. (if (<> lastdir 0) (set Package lastdir))
  220.  
  221. (set mFTPdir  (askdir (prompt #wheremFTP)
  222.                 (help   #wheremFTP)
  223.                      (default Package)
  224.                )  
  225. )
  226.  
  227. (set where mFTPdir)
  228.  
  229. ;********************************************************************
  230. ; Check to see if mFTP is already there, if so ask to backup
  231. ;********************************************************************
  232. (if (= 1 (exists (tackon where "mFTP") ) ) 
  233.   (
  234.     (set vernum1 (getversion (tackon where "mFTP") ))
  235.     (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  236.     (set mFTP_old (cat ver1 "." rev1))
  237.  
  238.     (message (cat #filethere1 ver1 "." rev1 #filethere2 where #filethere3 
  239.                   (cat "mFTP" mFTP_old) #filethere4 (tackon mFTPdir "mFTP") )
  240.     )
  241.  
  242.     (copyfiles (source (tackon where "mFTP"))
  243.                (dest where) 
  244.                (infos)
  245.                (newname (cat "mFTP." mFTP_old))
  246.     )
  247.     
  248.     (delete (tackon mFTPdir "mFTP") (prompt #oktodelete1) (help #oktodelete1) (confirm) (infos)) 
  249.  
  250.     (if (< (exists (tackon mFTPdir "mFTP")) 2) (makedir (tackon mFTPdir "mFTP") (infos)) )    
  251.  
  252.     (copyfiles (source (tackon where (cat "mFTP." mFTP_old) ))
  253.                        (dest (tackon mFTPdir "mFTP")) 
  254.                        (infos)
  255.                
  256.     )
  257.  
  258.     (delete (tackon where (cat "mFTP" mFTP_old)) (prompt #oktodelete2) (help #oktodelete2) (confirm) (infos) ) 
  259.  
  260.     ;(set firsttime 1)
  261.  
  262.   )
  263. )
  264.  
  265. (if (< (exists (tackon mFTPdir "mFTP")) 2) (makedir (tackon mFTPdir "mFTP") (infos)) )
  266.  
  267. ;********************************************************************
  268. ; copy rooticon if there
  269. ;********************************************************************
  270. (set pathI @icon)  (set pathIlen (strlen pathI))
  271. (set Inamelen (fileonly @icon))
  272. (set Inamelen (+ (strlen Inamelen) 1) )
  273. (set pathI (substr pathI 0 (- pathIlen Inamelen) ) )
  274.  
  275. (if (exists (cat pathI ".info"))
  276.   (copyfiles (source (cat pathI ".info")) (dest (tackon "/" where)) (newname "mFTP.info") (optional "nofail") ) 
  277. )
  278.  
  279. (set where (tackon mFTPdir "mFTP"))
  280. (set @default-dest where)
  281.  
  282. ;********************************************************************
  283. ; Check for old & backup
  284. ;********************************************************************
  285. (if (exists (tackon where "mFTP")) 
  286.   (
  287.       (set vernum1 (getversion (tackon where "mFTP") ))
  288.       (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  289.       (set mFTP_old (cat ver1 "." rev1))
  290.  
  291.       (set keeper  (askchoice (choices  (cat #backuptoXXX mFTP_old "'")  #copyover)
  292.                      (prompt #mFTPfound)
  293.                  (help   #mFTPfound)
  294.                      (default 0)
  295.                )
  296.       )    
  297.  
  298.       (if (= keeper 0)
  299.          (copyfiles (source (tackon where "mFTP"))
  300.                      (dest where) 
  301.                      (infos)
  302.                      (newname (cat "mFTP" mFTP_old))
  303.          )
  304.       )          
  305.  
  306.       (set firsttime 1)
  307.   )
  308. )
  309.  
  310. ;********************************************************************
  311. ; Copy over correct mFTP and Icon if wanted
  312. ;********************************************************************
  313. (copyfiles (source "mFTP") (dest where) (optional "nofail") )
  314.  
  315. (if (= firsttime 0)  (copyfiles (source "mFTP.info") (dest where) (optional "nofail") ) )
  316.  
  317. (if (OR (= keeper 1) (= (exists (tackon where "mFTP.info")) 0))
  318.   (
  319.    (set newicon (askchoice (choices #yesnewicon #nonewicon)
  320.                            (prompt #newicon)
  321.                        (help   #newicon)
  322.                            (default 0)
  323.             )
  324.    )
  325.   
  326.    (if (= newicon 0) 
  327.      (copyfiles (source "mFTP.info") (dest where)  (optional "nofail") )
  328.    )
  329.   )
  330. )
  331.  
  332. ;********************************************************************
  333. ; copy ButtonImages/#? if there 
  334. ;********************************************************************
  335. (set button 0)
  336.  
  337. (if (> (exists "Images") 0)
  338.  (
  339.   (if (> (exists (tackon where "Images")) 0)
  340.    (
  341.      (set button  (askchoice (choices #yesbutton #nobuttons)            
  342.                              (prompt #wantbuttons)
  343.                          (help   #wantbuttons)
  344.                              (default 1)
  345.                   )
  346.      )
  347.    )
  348.   )
  349.  
  350.   (if (= button 0)
  351.    (
  352.     (if (< (exists (tackon where "Images")) 2) (makedir (tackon where "Images"))  )
  353.     (foreach "Images" "#?"
  354.       (if (< @each-type 0)
  355.        (copyfiles (source (tackon "Images" @each-name)) (dest (tackon where "Images")) (infos) (optional "nofail") ) 
  356.       )
  357.     )
  358.    )
  359.   )
  360.  
  361.  ) 
  362. )
  363.  
  364.  
  365.  
  366. ;********************************************************************
  367. ; Ask and and copy docs if wanted!
  368. ;********************************************************************
  369. (set nodocs 0)
  370.  
  371. (set defdocs 1)
  372. (if (exists "Docs") (set defdocs (+ defdocs 2)) )
  373.  
  374. (set docs (askoptions (choices " mFTP.readme" " mFTP Docs (HTML format)")
  375.               (prompt #whatdocs)
  376.                       (help #whatdocs)
  377.                   (default defdocs)
  378.       )
  379. )
  380.  
  381.  
  382. (if (<> docs 0)
  383.  (
  384.    (set docsdir (askdir (prompt #wheredocs)
  385.                (help   #wheredocs)
  386.                     (default where)
  387.                 )  
  388.    )
  389.  
  390.    (if (IN docs 0)
  391.     (copyfiles (source "mFTP.readme") (dest docsdir) (infos) (optional "nofail") )
  392.    )
  393.  
  394.    (if (IN docs 1)
  395.     (
  396.       (if (< (exists (tackon docsdir "Docs")) 2) (makedir (tackon docsdir "Docs") (infos)) )    
  397.       (if (< (exists (tackon docsdir "Docs/images")) 2) (makedir (tackon docsdir "Docs/images") (infos)) )    
  398.       (if (exists "Docs.info")
  399.         (copyfiles (source "Docs.info") (dest docsdir) (optional "nofail") ) 
  400.       )
  401.  
  402.       (if (exists "Docs")
  403.         (foreach "Docs" "#?.html"
  404.            (copyfiles (source (tackon "Docs" @each-name)) (dest (tackon docsdir "Docs")) (optional "nofail") ) 
  405.         )
  406.       )
  407.  
  408.       (if (exists "Docs/images")
  409.         (foreach "Docs/images" "#?.gif"
  410.           (copyfiles (source (tackon "Docs/images" @each-name)) (dest (tackon docsdir "Docs/images")) (optional "nofail") ) 
  411.         )
  412.       )
  413.     )
  414.    )
  415.  
  416.  )
  417. )
  418.  
  419. ;********************************************************************
  420. ; Copy over #?.mpc|#?.mcc (Need to be in mui:libs/mui)
  421. ;********************************************************************
  422. (if (<> (getassign "mui") "")
  423. (
  424.   (if (> (exists "mui:libs/mui") 0) 
  425.    (
  426.     (working #updatingmuic)
  427.     (foreach "mui" "#?.mcp"
  428.         (copylib (source (tackon "mui" @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  429.     )
  430.     (foreach "mui" "#?.mcc"
  431.         (copylib (source (tackon "mui" @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  432.     )
  433.    )
  434.  
  435.    (message (cat #newermui muiver #nompc)) 
  436.   )
  437. )
  438. )
  439.  
  440. ;********************************************************************
  441. ; Copy MimePrefs
  442. ;********************************************************************
  443. (if (exists "MimePrefs")  
  444.  (
  445.   (if (exists "sys:prefs/MimePrefs" (noreq)) (set mpguess 1) (set mpguess 0))
  446.  
  447.   (set wheremp  (askchoice (choices where "SYS:Prefs")
  448.                            (prompt (cat #wheremp "\n"))
  449.                       (help   #wheremp)
  450.                         (default mpguess)
  451.                 )  
  452.   )
  453.  
  454.   (if (= wheremp 0) (set destmp where) (set destmp "SYS:Prefs"))
  455.  
  456.  
  457.   (if (exists (tackon destmp "MimePrefs.info"))  
  458.    (copylib (source "MimePrefs") (dest destmp) (optional "nofail") ) 
  459.    (copylib (source "MimePrefs") (dest destmp) (infos) (optional "nofail") ) 
  460.   )
  461.  
  462.  )
  463. )
  464.  
  465. ;********************************************************************
  466. ; Copy update Lib if wanted 
  467. ;********************************************************************
  468. (set deflibs 15)
  469. (if (> (exists "libs") 0)
  470.  (
  471.   (set deflibs 0)
  472.   (if (> (exists (tackon "libs" "vapor_update.library")) 0)       (set deflibs (+ deflibs 1)))
  473.   (if (> (exists (tackon "libs" "vapor_toolkit.library")) 0)      (set deflibs (+ deflibs 2)))
  474.   (if (> (exists (tackon "libs" "vapor_registration.library")) 0) (set deflibs (+ deflibs 4)))
  475.   (if (> (exists (tackon "libs" "CManager.library")) 0)           (set deflibs (+ deflibs 8)))
  476.  
  477.   (set libPick (askoptions (choices #lib1 #lib2 #lib3 #libC)
  478.               (prompt #updatedlibs)
  479.                       (help   (cat #libhelp1 #libhelp2 #libhelp3 #libhelpC))
  480.                     (default deflibs)
  481.            )
  482.   )
  483.  
  484.   (if (> libPick 0)
  485.    (
  486.     (set wherelibs (askdir (prompt #wherelibs)
  487.                   (help   #wherelibs)
  488.                        (default "LIBS:")
  489.                    )  
  490.     )
  491.     
  492.     (if (IN libPick 0)
  493.      (if (> (exists (tackon "libs" "vapor_update.library")) 0)
  494.       (copylib (source (tackon "libs" "vapor_update.library")) (dest wherelibs) (optional "nofail"))  
  495.      )
  496.     )
  497.  
  498.     (if (IN libPick 1)
  499.      (if (> (exists (tackon "libs" "vapor_toolkit.library")) 0)
  500.       (copylib (source (tackon "libs" "vapor_toolkit.library")) (dest wherelibs) (optional "nofail"))  
  501.      )
  502.     )
  503.  
  504.     (if (IN libPick 2)
  505.      (if (> (exists (tackon "libs" "vapor_registration.library")) 0)
  506.       (copylib (source (tackon "libs" "vapor_registration.library")) (dest wherelibs) (optional "nofail"))  
  507.      )
  508.     )
  509.  
  510.     (if (IN libPick 3)
  511.      (if (> (exists (tackon "libs" "CManager.library")) 0)
  512.       (copylib (source (tackon "libs" "CManager.library")) (dest wherelibs) (optional "nofail"))  
  513.      )
  514.     )
  515.  
  516.    (working #flushing)
  517.    (run "avail flush > NIL:")
  518.    (run "avail flush > NIL:")
  519.    (run "avail flush > NIL:")
  520.  
  521.    )
  522.  
  523.   )
  524.  )
  525. )
  526.  
  527. ;********************************************************************
  528. ; copy keyfile if there 
  529. ;********************************************************************
  530. (if (> (exists "mftp.key") 0)
  531.  (copyfiles (source "mftp.key") (dest where) (infos) (optional "nofail") ) 
  532. )
  533.  
  534. ;********************************************************************
  535. ; Reg stuff Register-AmIRC
  536. ;********************************************************************
  537. (procedure checkforkey
  538.  (set foundkey 0) 
  539.  (set kc "mftp.key")
  540.  
  541.  (if (exists kc (noreq)) (set foundkey 1) )
  542.  (if (exists (tackon where kc) (noreq)) (set foundkey 1) )
  543.  (if (exists (tackon "s:" kc) (noreq)) (set foundkey 1) )
  544.  (if (exists (tackon "l:" kc) (noreq)) (set foundkey 1) )
  545.  (if (exists (tackon "libs:" kc) (noreq)) (set foundkey 1) )
  546.  (if (exists (tackon "keypath:" kc) (noreq)) (set foundkey 1) )
  547.  (if (exists (tackon "keyfiles:" kc) (noreq)) (set foundkey 1) )
  548.  
  549.  (if (= foundkey 0)
  550.   (set wantkey (askchoice  (choices #insregstuffno #insregstuff)
  551.                        (prompt #installerreg)
  552.                            (help #installerreg)
  553.                        (default 1)
  554.                )
  555.   )
  556.  
  557.   (set wantkey 0)
  558.  )
  559. )
  560.  
  561. (checkforkey)
  562.  
  563. (if (AND (exists "Register-mFTP") (= wantkey 1))
  564.  (
  565.   (if (< (exists (tackon where "Register-mFTP")) 2) (makedir (tackon where "Register-mFTP") (infos)) )    
  566.   (if (exists "Register-mFTP.info")
  567.     (copyfiles (source "Register-mFTP.info") (dest where) (optional "nofail") ) 
  568.   )
  569.   (set whereR (tackon where "Register-mFTP"))
  570.  
  571.  
  572.   (set whatreg  (askchoice (choices "English"  "Deutsch" "Francais" )
  573.                            (prompt "What Registration Files (Language) would you like to install?")
  574.                        (help   "What Registration Files (Language) would you like to install?")
  575.                         (default 0)
  576.                 )  
  577.   )
  578.  
  579.   (if (= whatreg 0) ((set basereg "English")  (set baseregTT "English") ) )
  580.   (if (= whatreg 1) ((set basereg "Deutsch")  (set baseregTT "Deutsch") ) )
  581.   (if (= whatreg 2) ((set basereg "Francais") (set baseregTT "French")  ) )
  582.  
  583.   (if (exists "Register-mFTP/RegistrationUtility") 
  584.     (copyfiles (source "Register-mFTP/RegistrationUtility")
  585.                (dest whereR)
  586.                (infos)
  587.     )
  588.   )
  589.  
  590.   ;(if (exists (tackon "Register-mFTP" (cat "Regtool-" basereg ".info")) )
  591.   ;  (copyfiles (source (tackon "Register-mFTP" (cat "Regtool-" basereg ".info")) )
  592.   ;             (dest whereR) 
  593.   ;             (newname "RegistrationUtility.info")
  594.   ;  )
  595.   ;)
  596.  
  597.   (if (exists (tackon "Register-mFTP" (cat "Reg_" basereg ".guide")) ) 
  598.     (copyfiles (source (tackon "Register-mFTP" (cat "Reg_" basereg ".guide")))
  599.                (dest whereR) 
  600.                (infos)
  601.     )
  602.   )
  603.  
  604.   (if (exists (tackon "Register-mFTP" (cat "Reg_" basereg ".doc")) )
  605.     (copyfiles (source (tackon "Register-mFTP" (cat "Reg_" basereg ".doc")))
  606.                (dest whereR) 
  607.                (infos)
  608.     )
  609.   )
  610.  
  611.  
  612.  )
  613. )
  614.  
  615.  
  616. ;********************************************************************
  617. ; End Bye 
  618. ;********************************************************************
  619. (if (> (exists ("c:multiview")) 0) (set #mpath "c:") )
  620. (if (> (exists ("sys:Utilities/multiview")) 0) (set #mpath "sys:Utilities") )
  621.  
  622. (run (cat "run " #mpath "/multiview mFTP.readme") )
  623. (exit (quiet) #byebye)
  624.  
  625.